<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateInfoModelTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('info_model', function (Blueprint $table) {
            $table->increments('id')->comment('自增ID');
            $table->string('name', 30)->default('')->comment('模型名称');
            $table->string('table_name', 50)->default('')->comment('表名');
            $table->tinyInteger('status')->default(1)->comment('发布状态，0未发布，1已发布 ，数据字典');
            $table->unsignedInteger('created_user_id')->default('0')->comment('管理员ID');
            $table->timestamp('created_at')->nullable()->comment('创建时间');
            $table->timestamp('updated_at')->nullable()->comment('更新时间');
            $table->softDeletes()->comment('删除时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('info_model');
    }
}
